﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;


namespace WaiGaoQiaoWeb.Models
{
    public class PostVM
    {
        #region -------------  字段------------------------
        /// <summary>
        /// ID
        /// </summary>
        public int ID { get; set; }
        /// <summary>
        /// 岗位名称
        /// </summary>
        [DisplayName("岗位名称")]
        [Required(ErrorMessage = "岗位名称不能为空")]
        public int PostId { get; set; }
        /// <summary>
        /// 物品名称
        /// </summary>
        [DisplayName("物品名称")]
        [Required(ErrorMessage = "物品名称不能为空")]
        public int ArticleId { get; set; }
        /// <summary>
        /// 领取时间
        /// </summary>
        [DisplayName("领取时间")]
        public int RuleId { get; set; }
        /// <summary>
        /// 领取数量
        /// </summary>
        [DisplayName("领取数量")]
        [RegularExpression(@"^[1-9]+(.[0-9]{0,3})?$", ErrorMessage = "领取数量必须为正整数")]
        public int GiveCount { get; set; }

        [Required(ErrorMessage = "岗位名称不能为空")]
        public int Work_postStructrueId { get; set; }
        public int Work_postStructrueId1 { get; set; }
        [Required(ErrorMessage = "物品名称不能为空")]
        public int Work_ArticleInfoID { get; set; }
        public int Work_ArticleInfoID1 { get; set; }
        #endregion
    }
}